package com.sch.example.view;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 生成wheel的各种选项
 */
public class WheelStyle_New {

    public static final int STYLE_TIME = 0;  // 选择时间

    public static final int STYLE_HOUR = 1;

    public static List<String> getItemList(int Style, String[] arr_time) {

        if (Style == STYLE_HOUR) {
            return createHourString();

        // 选择时间
        } else if (Style == STYLE_TIME) {
            return new ArrayList<>(Arrays.asList(arr_time));

        } else {
            throw new IllegalArgumentException("style is illegal");

        }

    }

    private static List<String> createHourString() {
        List<String> wheelString = new ArrayList<>();
        for (int i = 0; i < 24; i++) {
            wheelString.add(String.format("%02d", i));
        }
        return wheelString;
    }


}
